package com.tensquare.qa.client.impl;

import com.tensquare.qa.client.LabelClient;
import entity.Result;
import entity.StatusCode;
import org.springframework.stereotype.Component;

/**
 * Created by Administrator on 2021/6/23.
 * 熔断器,需要实现Feign的接口
 * 当微服务方法不可用时,调用此对象中的方法返回(模拟错误信息返回)
 */
@Component
public class LabelClientImpl implements LabelClient {
    @Override
    public Result findOne(String labelIdx) {
        return new Result(false, StatusCode.ERROR,"熔断器启动了");
    }
}
